import request from "@/utils/request";

// 查询操作日志列表
export function list(query) {
  return request({
    url: "/monitor/operlog/list",
    method: "get",
    params: query,
  });
}

// 删除操作日志
export function delOperlog(operId) {
  return request({
    url: "/monitor/operlog/" + operId,
    method: "delete",
  });
}

// 清空操作日志
export function cleanOperlog() {
  return request({
    url: "/monitor/operlog/clean",
    method: "delete",
  });
}

// 云产品运营审计
export function productAuditlist(query) {
  return request({
    url: "/monitor/operate/list",
    method: "get",
    params: query,
  });
}
// 云资源运营审计
export function clouResources(query) {
  return request({
    url: "/monitor/run/list",
    method: "get",
    params: query,
  });
}
// 云平台运维审计
export function maintenance(query) {
  return request({
    url: "/monitor/maintenance/list",
    method: "get",
    params: query,
  });
}
//查询资源池列表
export function getMonitorRunList() {
  return request({
    url: "/monitor/run/list",
    method: "get",
  });
}
//查询资源池可用区列表
export function getMonitorRunDetail(query) {
  return request({
    url: "/monitor/run/detail",
    method: "get",
    params: query,
  });
}
//不合规
export function updateNotCompliance(data) {
  return request({
    url: "/monitor/operlog/updateNotCompliance",
    method: "post",
    data,
  });
}
//合规审计列表
export function auditList(query) {
  return request({
    url: "/compliance/audit/list",
    method: "get",
    params: query,
  });
}
//操作按钮合规不合规
export function complianceAudit(data) {
  return request({
    url: "/compliance/audit",
    method: "put",
    data,
  });
}
